<?php

class Html_Render_Group
{
	public function render($group)
	{
		$tag = $group -> getMeta('tag', 'div');

		$xhtml = array();

		foreach ($group->getChildren() as $ele)
		{
			$xhtml[] = $ele -> render();
		}
		return sprintf('<%s %s>%s</%s>', $tag, $group -> __flat(), implode(PHP_EOL, $xhtml), $tag);
	}

}
